<?php

//No direct access

defined('_JEXEC') or die('Restricted access');

?>

<div id="ownservices">


 <div id="mainmenuownservice"><?php echo MenuHelper::nav(); ?></div>


	<div id="mainownservice">

		<h3><?php echo JText::_('OWNSERVICE_TRANSFERRED_RECORD_STAFF_TRANSFER'); ?></h3>

		<hr />

		<script language="javascript" type="text/javascript">

			<!--
				function submitbutton(pressbutton)

				{
					var form = document.adminForm;

					if(form.transfer_id.value == '') {
						alert( "<?php echo JText::_( 'OWNSERVICE_PLEASE_SELECT_USER', true ); ?>" );
						return false;
					}

					if(form.period[0].checked) {

						if(form.date.value == "") {

							alert( "<?php echo JText::_( 'OWNSERVICE_PLEASE_SELECT_DAY', true ); ?>" );

							return false;

						}

					} else if(form.period[1].checked) {

						if(form.month.value == "") {

							alert( "<?php echo JText::_( 'OWNSERVICE_PLEASE_SELECT_MONTH', true ); ?>" );

							return false;

						}

					} else if(form.period[2].checked) {

						if(form.from.value == "") {

							alert( "<?php echo JText::_( 'OWNSERVICE_PLEASE_SELECT_FROM', true ); ?>" );

							return false;

						} else if(form.to.value == "") {

							alert( "<?php echo JText::_( 'OWNSERVICE_PLEASE_SELECT_TO', true ); ?>" );

							return false;

						}

					} else {

						alert( "<?php echo JText::_( 'OWNSERVICE_PLEASE_SELECT_PERIOD', true ); ?>" );

						return;

					}



					submitform( pressbutton );
				}
			//-->
		</script>

		<form action="<?php echo JRoute::_('index.php?option=com_ownservice'); ?>" method="post" name="adminForm">



		<table class="admintable">

			<tr>

				<td class="key"><?php echo JText::_('OWNSERVICE_PLEASE_SELECT_STAFF_TRANSFER'); ?></td>

				<td><?php echo $this->lists['stafftransfer']; ?></td>

			</tr>

			<tr>

				<td class="key"><?php echo JText::_('OWNSERVICE_SELECT_PERIOD'); ?></td>

				<td><input type="radio" name="period" id="pday" value="1" class="inputbox" checked="checked" /> <?php echo JText::_('OWNSERVICE_DAY');?> <?php echo JHTML::_('calendar', date('Y-m-d'), 'date', 'date', '%Y-%m-%d',array('class'=>'inputbox')); ?></td>

			</tr>

			<tr>

				<td></td>

				<td>

					<input type="radio" name="period" id="pmonth" value="2" class="inputbox" /> <?php echo JText::_('OWNSERVICE_MONTH');?>

					<select name="month" id="mouth" class="inputbox">

						<option value=""><?php echo JText::_('OWNSERVICE_PLEASE_SELECT'); ?></option>

						<option value="01"><?php echo JText::_('OWNSERVICE_JANUARY'); ?></option>

						<option value="02"><?php echo JText::_('OWNSERVICE_FEBRUARY'); ?></option>

						<option value="03"><?php echo JText::_('OWNSERVICE_MARCH'); ?></option>

						<option value="04"><?php echo JText::_('OWNSERVICE_APRIL'); ?></option>

						<option value="05"><?php echo JText::_('OWNSERVICE_MAY'); ?></option>

						<option value="06"><?php echo JText::_('OWNSERVICE_JUNE'); ?></option>

						<option value="07"><?php echo JText::_('OWNSERVICE_JULY'); ?></option>

						<option value="08"><?php echo JText::_('OWNSERVICE_AUGUST'); ?></option>

						<option value="09"><?php echo JText::_('OWNSERVICE_SEPTEMBER'); ?></option>

						<option value="10"><?php echo JText::_('OWNSERVICE_OCTOBER'); ?></option>

						<option value="11"><?php echo JText::_('OWNSERVICE_NOVEMBER'); ?></option>

						<option value="12"><?php echo JText::_('OWNSERVICE_DECEMBER'); ?></option>

					</select>

				 </td>

			</tr>

			<tr>

				<td></td>

				<td><input type="radio" name="period" id="pform" value="3" class="inputbox" /> <?php echo JText::_('OWNSERVICE_FROM');?> <?php echo JHTML::_('calendar','', 'from', 'from', '%Y-%m-%d',array('class'=>'inputbox')); ?> <?php echo JText::_('OWNSERVICE_TO'); ?> <?php echo JHTML::_('calendar','', 'to', 'to', '%Y-%m-%d',array('class'=>'inputbox')); ?></td>

			</tr>

			<tr>

				<td colspan="2" align="center"><input type="button" name="next" value="<?php echo JText::_('OWNSERVICE_REPORTS'); ?>" onClick="javascript: submitbutton('transferredStaffTransfer');" /></td>

			</tr>

		</table>



		<input type="hidden" name="option" value="com_ownservice" />

		<input type="hidden" name="task" value="" />

		<input type="hidden" name="Itemid" value="<?php echo JRequest::getVar('Itemid'); ?>" />

		<input type="hidden" name="controller" value="report" />

		<input type="hidden" name="view" value="report" />

		<?php echo JHTML::_( 'form.token' ); ?>

		</form>

	</div>

</div>